package mysql

import "gorm.io/gorm"

type DocTor struct {
	gorm.Model
	DepartmentId    int     `gorm:"type:int(10);not null;comment:'科室Id'"`
	HospitalId      int     `gorm:"type:int(10);not null;comment:'医院Id'"`
	DocTorName      string  `gorm:"type:varchar(10);not null;comment:'医生名称'"`
	BeOnDutyTimeSta string  `gorm:"type:varchar(20);not null;comment:'值班开始时间'"`
	BeOnDutyTimeEnd string  `gorm:"type:varchar(20);not null;comment:'值班结束时间'"`
	DocTorPrice     float64 `gorm:"type:double(10,2);not null;comment:'价格'"`
	DocTorInventory float64 `gorm:"type:int(10);not null;comment:'库存'"`
}

func DoctorList() (result []*DocTor, err2 error) {
	DB.Debug().Find(&result)
	return
}
func DocTorShow(id int) (result *DocTor, err2 error) {
	DB.Debug().Where("id = ?", id).Limit(1).Find(&result)
	return
}
